local _G = _G
local addon, ns = ...
local profile = ns.profile
local cfg = {}
local noshow
local SaveVars
local SML
local SML_LANG_MASK_ALL = 255
if not _G.LabelUI_mod then
	_G.LabelUI_mod = {}	
end
  
local Sharedmediamod = CreateFrame("Frame", nil, UIParent)
--END LabelUI declaration
local function RegisterFont(fontName, fontPath)
 -- Don't do anything if the font name or font path is invalid.
 if (type(fontName) ~= "string" or type(fontPath) ~= "string") then return end
 if (fontName == "" or fontPath == "") then return end

 -- Register with shared media.
 SML:Register("font", fontName, fontPath, SML_LANG_MASK_ALL)
end

local font = "Interface\\Addons\\LabelUI\\media\\Aquarion.otf"
  
local function Enablemod()
	RegisterFont("Aquarion", font)	
	Sharedmediamod.ready = true
end 
  
local function Init()
	--IF we have lib, we must add our font to it.
	if not LibStub then return end
	SML = LibStub("LibSharedMedia-3.0")
	if not SML then return end 
	Enablemod()
end

function Sharedmediamod.InitMod(main, profilename)
	noshow = main.noshow 
	SaveVars = main.SaveVars
	
	main:AddInit(Init, "Addon SharedMediaMod")
end 

ns.Sharedmediamod = Sharedmediamod
  
_G.LabelUI_mod["Sharedmediamod"] = Sharedmediamod